@extends('index.client')
@section('body')
    <div class="container ">
        <div class="row">
            <div class="col s8 m8 l8">
                <div class="page-content card aos-item animated rollIn">
                    <div class="card-image title-img">
                        <img src="{{$post->meta->img}}">
                    </div>
                    <div class="card-content content-panel">
                        <p>
                        <div class="content-title">
                            {{$post->title}}</div>
                        </p>
                        <p class="content-cell">
                            {!! $post->content !!}
                        </p>
                    </div>
                    <div class="card-action" style="padding: 0 24px;">
                        <p><i class="material-icons">mode_comment</i></p>
                    </div>
                </div>
            </div>
            <div class="col s4 m4 l4">
                <div class="z-depth-1 animated fadeInRight">
                    <div class="sider-title">最近文章</div>
                    <ul class="collection list-recent">
                        @foreach($recents as $recent)
                            <li class="collection-item avatar">
                                <img src='{{URL::asset("/images/background02.jpg")}}' alt="" class="circle">
                                <span class="title">{{$recent->title}}</span>
                                <p class="item-recent">{{\App\Services\Util::formatTime($recent->created_at)}}<br>
                                </p>
                                <a href="#!" class="secondary-content"><i class="material-icons">grade</i></a>
                            </li>
                        @endforeach
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <script src="{{URL::asset('js/view.js')}}"></script>
    <script>
    </script>
    @endsection